package com.ericpol.page;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;

public class LoginPage extends Page {

	public LoginPage(WebDriver driver) {
		super(driver);
	}
	
	public MainPage login(String login, String password) throws Exception {
		insertText(By.id("login"), login);
        insertText(By.id("password"), password);
        findAndClick(By.name("commit"));
		return new MainPage(driver);
	}

	public void open() {
		openUrl("http://demo.bananascrum.com/login/");		
	} 
}
